<div class="modal-header">
    <h4 class="modal-title">修改密码</h4>
</div>
<div class="modal-body">
    <form name="form" class="form-horizontal" novalidate>
        <div class="form-group">
            <div class="input-group col-sm-10 col-sm-offset-1" popover-trigger="click"  uib-popover="{{form.password.$error.required?'请输入原密码!':''}}" popover-placement="top" >
                <div class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></div>
                <input type="password" class="form-control" required name="password" ng-model="password" placeholder="原密码">
            </div>
        </div>
        <div class="form-group">
            <div class="input-group col-sm-10 col-sm-offset-1" popover-trigger="mouseenter"
                 uib-popover="{{form.password1.$error.required?'请输入新密码!':(form.password1.$error.pattern?'请输入6-20个字符!':'')}}" popover-placement="top" >
                <div class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></div>
                <input type="password" class="form-control" required ng-pattern="/^[\w!,@#$%^&*?_~]{6,20}$/" name="password1" ng-model="password1" placeholder="新密码"
            >
            </div>
        </div>
        <div class="form-group">
            <div class="input-group col-sm-10 col-sm-offset-1"
                 uib-popover="{{form.password2.$error.required?'请再输一次新密码!':(password1!=password2?'密码不一致！':'')}}"  popover-trigger="mouseenter">
                <div class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></div>
                <input type="password" class="form-control" required name="password2" ng-model="password2" placeholder="再输入一次新密码" ng-class="{error:(password2 && password1!=password2)}">
            </div>
        </div>
    </form>
</div>
<div class="modal-footer">
    <button class="btn btn-primary" type="button" ng-click="ok(form)">确定</button>
    <button class="btn btn-warning" type="button" ng-click="cancel()">取消</button>
</div>